#!/usr/bin/env python
'''
BeerCoaster collector
'''

import os
import sys

try:
    import pygtk
    # tell pyGTK, if possible, that we want GTKv2
    pygtk.require("2.4")
except:
     # Some distributions come with GTK2, but not pyGTK
    pass

try:
    import gtk
    import gtk.glade
except:
    print("You need to install pyGTK or GTKv2 ")
    print("or set your PYTHONPATH correctly.")

import Misc
from MainWindow import MainWindow

def main():
    '''Start everything'''
    m = MainWindow()
    gtk.main()
    return False

if __name__ == '__main__':
    try:
        sys.exit(main())
    except KeyboardInterrupt:
        print("Caught keyboard interrupt (CTRL+C)...")
        sys.exit(0)
